1. Field of the Invention
The present invention relates to an image-component rendering method and a recording medium in which an image-component rendering program is recorded, and more particularly to an image-component rendering method for rendering from an original image an object image representing an object included in the original image into a component as well as a recording medium in which an image-component rendering program is recorded.
2. Description of the Related Art
In recent years, in conjunction with progress made in computer technology, there are cases where color images are digitized as image data, and the image data is stored or circulated so as to be made use of. This digitized image data includes, among others, image data representing photographed images which are generated by being photographed by a digital photographing apparatus such as a digital camera, or image data representing scanned images which are generated by scanning color originals by a scanner.
Since the aforementioned image data is easy to process, there is a demand for reusing partial images (hereafter referred to as object images) which represent scenes and objects, such as mountains and persons, which are included in original images. To reuse the object images, the object images must be extracted from the original images. In this extraction, a region including the object image can be extracted by clipping out an original image in a shape designated in advance or by clipping out a fixed area from the original image by using commercially available application software, but there are cases where a non-object image other than the required object image is included.
For this reason, many techniques have been proposed for extracting a predetermined region from an original image. For example, the present assignee has proposed a technique for separating a desired color region from an original image (Japanese Patent Application Laid-Open (JP-A) No. 8-221567).
However, the object image is a desired color image, and the object image which is obtained by separating the desired color region from the original image is limited at the time of reuse. Namely, when the object image is reused, there are cases where the object image is enlarged or reduced. In this case, there are cases where a change in the resolution of the object image is required, and an object image which conforms to that resolution is required. For instance, rephotographing is required in the case of the photographed image, and rescanning is required in the case of the scanned image. Accordingly, even if the desired color region is separated, it is merely an image of a clipped out region, and there is a limit to the reuse threrof. For this reason, there is a need to render object images into components for the purpose of reuse.
In view of the above-described circumstances, it is an object of the present invention to provide an image-component rendering method for rendering an object image included in an original image into a component which can be easily reused, as well as a recording medium in which an image-component rendering program is recorded.
To this end, in accordance with a first aspect of the present invention, there is provided an image-component rendering method comprising the steps of: generating discontinuity information of an original image representing discontinuity of color information expressed by a line process, on the basis of the color information of the original image; extracting a contour of an object image included in the original image on the basis of the generated discontinuity information, and separating the object image by using the extracted contour; and determining outline information in which the contour of the object image is outlined on the basis of the discontinuity information with respect to the separated object image, and encoding color information of the object image.
In accordance with a second aspect of the present invention, in the image-component rendering method according to the first aspect of the invention, the contour of the original image is outlined by a parametric curve, and the color information is encoded by a parametric surface.
In accordance with a third aspect of the present invention, the image-component rendering method according to the first aspect of the invention further comprises the step of: further separating the object image into element images making up the object image so as to render the object image into components.
In accordance with a fourth aspect of the present invention, there is provided a recording medium in which an image-component rendering program is recorded for rendering from an original image an object image representing an object included in the original image into a component, wherein the image component-rendering program causes discontinuity information of an original image representing discontinuity of color information expressed by a line process to be generated on the basis of the color information of the original image; causes a contour of an object image included in the original image to be extracted on the basis of the generated discontinuity information, and causes the object image to be separated by using the extracted contour; and causes outline information in which the contour of the object image is outlined on the basis of the discontinuity information to be determined with respect to the separated object image, and causes color information of the object image to be encoded.
In accordance with a fifth aspect of the present invention, in the recording medium in which an image-component rendering program is recorded according to the fourth aspect of the invention, the contour of the original image is outlined by a parametric curve, and the color information is encoded by a parametric surface.
In the image-component rendering method in accordance with the above-described first aspect of the invention, discontinuity information of an original image representing discontinuity of color information expressed by a line process is generated on the basis of the color information of the original image. The line process expresses the discontinuity of color information, i.e., whether the color information is continuous or discontinuous. If an energy function is defined by the color information and the line process, and minimization of energy using the energy function is performed, the line process has a value at a location where the color information is discontinuous in the original image. The discontinuity information of the original image can be expressed by the line process having this value. Since this discontinuity information expresses the location where the color information is discontinuous in the original image, a boundary of color information is formed between adjacent color regions which are not formed by identical or similar color information and are formed by different color information. Accordingly, in the color region formed by identical or similar color information, discontinuity information appears in its contour portion. The object image included in the original image is composed of identical or similar color information, or is composed by a plurality of pieces of predetermined color information. Accordingly, a contour of the object image included in the original image is extracted on the basis of the discontinuity information. The object image is separated by using the contour thus extracted.
Next, with respect to the separated object image, outline information, in which the contour of the object image is outlined on the basis of the discontinuity information, is determined. By the outline information is meant information which is capable of changing the size, e.g., enlarging or reducing the size, while maintaining most of the original information (i.e., information pertaining to the contour). For instance, the outline information includes shape information which is formed of points, segments, and vector information such as surface information. This shape information can be described by a mathematical formula. By describing the contour of the object image by the outline information in this manner, it is possible to represent the contour of the object image without depending on the resolution. The color information of the original image is included within the contour of the original image, and becomes continuous without involving discontinuity, so that the color information of the object image is encoded by an expression based on continuous information. As this encoding, encoding which approximately expresses color information can be cited as one example, and an image data format known as JPEG or the like can be used as a reusable format.
Thus, since the contour of the original image is described by the outline information, and the color information of the original image is encoded in a reusable format, even in a case where the object image needs to be enlarged or reduced at the time of its reuse, the object image can be used in the format which maintains the contour of the original image without the contour of the object image depending on the resolution at the time of enlargement or reduction.
When the object image is represented, the contour is an outermost periphery of the original image, and forms a two-dimensional curve. In addition, the color information is included within the contour of the original image, and is continuous. The color information can be represented three-dimensionally for each color in relation to its position and density. Accordingly, the continuous color information can be made to correspond to a three-dimensional surface. Such a curve or surface is preferably represented in a format which can be easily handled. Therefore, as shown in the second aspect of the invention, the contour of the original image is outlined by a parametric curve, and the color information is encoded by a parametric surface. In this way, the contour and the color information of the original image can be represented in a simple description format by using formulae, thereby making it possible to use the original image easily.
There are cases where an object image is formed from a plurality of element images. For example, in a case where the object image is that of a person, there are cases where the object image is made up by such element images as the head, arms, torso, legs, and the like. Accordingly, as stated in the third aspect of the invention, the object is further separated image into element images making up the object image so as to be formed into components. In this way, the element images of the original image can be formed into components from the original image, and the original image to be reused can be subdivided.
The rendering of the object image into a component in accordance with the above-described image-component rendering method can be realized through a computer by executing an image-component rendering program recorded in the recording medium in accordance with the above-described fourth aspect of the invention. Specifically, the recording medium is one in which an image-component rendering program is recorded for rendering from an original image an object image representing an object included in the original image into a component, wherein the image component-rendering program causes discontinuity information of an original image representing discontinuity of color information expressed by a line process to be generated on the basis of the color information of the original image; causes a contour of an object image included in the original image to be extracted on the basis of the generated discontinuity information, and causes the object image to be separated by using the extracted contour; and causes outline information in which the contour of the object image is outlined on the basis of the discontinuity information to be determined with respect to the separated object image, and causes color information of the object image to be encoded. Consequently, the object image can be rendered into a component by the computer without the contour of the object image depending on the resolution at the time of enlargement or reduction.
It should be noted that, as shown in the fifth aspect of the invention, the contour of the original image can be outlined by a parametric curve which facilitates its handling, and the color information can be encoded by a parametric surface.